#include "EventCatcher.h"

EventCatcher::EventCatcher(IrrlichtDevice *device) {
	m_device = device;
}

EventCatcher::~EventCatcher() {
}

bool EventCatcher::OnEvent(const SEvent& event)
{
	std::vector<boost::shared_ptr<EventHandler> >::iterator eventIterator;
	for(eventIterator = m_eventHandlers.begin();
	eventIterator != m_eventHandlers.end();
	eventIterator++) {
		if((*eventIterator)->OnEvent(event))
			return true;
	}
	
	return false;
}
